import {ObjectDto, ObjectDtoInterface} from "../../../services/sqliteDB/object.dto";
import { TableColumnType } from "../../../services/sqliteDB/object.dto";
import {SyncStatus} from "../../sync-status";

export class InspectionManualsDto extends ObjectDto implements ObjectDtoInterface {

    public id: number = null;            //    primary key
    public taskId: string = null;       // 检修的任务Id
    public name: string = null;         // 作业指导书名字
    public path: string = null;         // 本地的文件路径
    public attachmentId: number = null;
    public isDownload: 0 = null; // 是否下载
    public syncStatus: SyncStatus = SyncStatus.None;         // 同步状态：   （0: 从来没上传, 1: 上传成功, 2: 正在上传, 3: 上传失败)



  constructor() {
        super();
    }

    table() {
        return {
            tableName: "InspectionManuals",
            tableConstructor: {
                id: `${TableColumnType.int} ${TableColumnType.unique}`,
                taskId: TableColumnType.text,
                name: TableColumnType.text,
                path: TableColumnType.text,
                attachmentId: TableColumnType.int,
                isDownload: TableColumnType.int,
                syncStatus: TableColumnType.int
            }
        };
    }

}
